package com.ruoyi.common.utils;

import java.util.Comparator;
import java.util.Map;
import java.util.TreeMap;

public class MapUtils {
    /**
     * 返回按key是字典排序的map
     * @param paramsMap
     * @return
     */
    public static Map<String, Object> sortMap(Map<String, Object> paramsMap) {
        Map<String, Object> treeMap = new TreeMap(Comparator.naturalOrder());
        treeMap.putAll(paramsMap);
        return treeMap;
    }
}
